<?php

namespace common\models\shop;

use Yii;

/**
 * This is the model class for table "{{%shop_order_discount}}".
 *
 * @property int $id
 * @property int $order_id 订单ID
 * @property int $order_goods_id 订单商品ID
 * @property int $discount_id 优惠ID
 * @property int $created_at 创建时间
 * @property int $updated_at 更新时间
 */
class ShopOrderDiscount extends \common\db\ActiveRecord {

    /**
     * {@inheritdoc}
     */
    public static function tableName() {
        return '{{%shop_order_discount}}';
    }

    /**
     * {@inheritdoc}
     */
    public function rules() {
        return [
            [['order_id', 'order_goods_id', 'discount_id', 'created_at', 'updated_at'], 'integer'],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels() {
        return [
            'id' => 'ID',
            'order_id' => '订单ID',
            'order_goods_id' => '订单商品ID',
            'discount_id' => '优惠ID',
            'created_at' => '创建时间',
            'updated_at' => '更新时间',
        ];
    }

}
